<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- <style>
        .color {
            color: red;
        }
      
        #hot {
            color: green;
        }
      </style>
           -->
      <h2 class="color" id="hot">HDCMS</h2>
      

      <style>
        /* 权重:0021 */
        h2[class="color"][id] {
              color: red;
              
        }
      
        /* 权重:0012 */
        article h2[class="color"] {
            color: blue;
            background-color: chartreuse;
        }
      </style>
      
      <article>
          <h2 class="color" id="hot">HDCMS</h2>
      </article>
      
</body>
</html>